package com.pine.dao.pineframework.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pine.common.database.entity.BaseEntity;
import com.pine.dao.pineframework.constants.ApprovalStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 系统审批申请表
 * </p>
 *
 * @author pine manage
 * @since 2024-10-31
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "SysApprovalApplication", description = "系统审批申请表")
@TableName("sys_approval_application")
public class SysApprovalApplication extends BaseEntity<Long> implements Serializable {

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 546120876229930112L;

    @Schema(description = "审批ID")
    private String approvalId;

    @Schema(description = "申请名称")
    private String name;

    @Schema(description = "申请类型")
    private String type;

    @Schema(description = "申请内容")
    private String content;

    @Schema(description = "附件地址")
    private String attachmentUrl;

    @Schema(description = "申请状态:0=待提交,1=待审批,2=已审批,3=已拒绝,4=已完成,5=已取消")
    private ApprovalStatusEnum status;

    @Schema(description = "创建人ID")
    private Long createUserId;

    @Schema(description = "创建人名称")
    private String createUsername;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "更新人ID")
    private Long updateUserId;

    @Schema(description = "审批人ID")
    private Long approvalUserId;

    @Schema(description = "审批人名称")
    private String approvalUsername;

    @Schema(description = "备注")
    private String remark;
}
